package IO;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-08-26
 * Time: 15:27
 */
public class Demo3 {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = null;
        try {
            inputStream = new FileInputStream("./text.txt");
            //因为InputStream是抽象类只能通过实例化他的子类来进行创建对象。
        }catch (IOException e) {
            e.printStackTrace();
        } finally{
            inputStream.close();
        }
    }
}
